package com.baizhi.service.impl;

import com.baizhi.entity.CmfzBanner;
import com.baizhi.mapper.CmfzBannerMapper;
import com.baizhi.service.CmfzBannerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * InnoDB free: 11264 kB 服务实现类
 * </p>
 *
 * @author xiaoxiao
 * @since 2020-08-19
 */
@Transactional
@Service
public class CmfzBannerServiceImpl extends ServiceImpl<CmfzBannerMapper, CmfzBanner> implements CmfzBannerService {
    @Transactional(readOnly = true)
    @Override
    public PageInfo<CmfzBanner> selectAllByPage(Integer page, Integer limit) {
        PageHelper.startPage(page,limit);
        List<CmfzBanner> bannerList = baseMapper.selectList(null);
        return new PageInfo<>(bannerList);
    }
}
